package com.zzz.topic.listener;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author ZZZ
 * @version 1.0
 * @date 2019/4/1 0001
 */
@Component
public class TopicReceiver {

    @RabbitListener(queues = "topic.message")    //监听器监听指定的Queue
    public void process1(String str) {
        System.out.println("message:" + str);
    }

    @RabbitListener(queues = "topic.messages")    //监听器监听指定的Queue
    public void process2(String str) {
        System.out.println("messages:" + str);
    }
}
